﻿// Control30Dlg.cpp: 实现文件
//

#include "pch.h"
#include "ProjectAA.h"
#include "Control30Dlg.h"
#include "afxdialogex.h"


// CControl30Dlg 对话框

IMPLEMENT_DYNAMIC(CControl30Dlg, CDialogEx)

CControl30Dlg::CControl30Dlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_DIALOG_CONTROL_30, pParent)
{

}

CControl30Dlg::~CControl30Dlg()
{
}

void CControl30Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CControl30Dlg, CDialogEx)
	ON_BN_CLICKED(IDC_BUTTON6, &CControl30Dlg::OnBnClickedButton6)
	ON_BN_CLICKED(IDC_BUTTON4, &CControl30Dlg::OnBnClickedButton4)
	ON_BN_CLICKED(IDC_BUTTON5, &CControl30Dlg::OnBnClickedButton5)
	ON_BN_CLICKED(IDC_BUTTON10, &CControl30Dlg::OnBnClickedButton10)
	ON_BN_CLICKED(IDC_BUTTON26, &CControl30Dlg::OnBnClickedButton26)
	ON_BN_CLICKED(IDC_BUTTON27, &CControl30Dlg::OnBnClickedButton27)
END_MESSAGE_MAP()


// CControl30Dlg 消息处理程序


void CControl30Dlg::OnBnClickedButton6()
{
	if (gSystemMgr.Y54 == OFF) {
		gSystemMgr.m_cIo.SetOutputIo(54, ON);
	}
	else {
		gSystemMgr.m_cIo.SetOutputIo(54, OFF);
	}
}


void CControl30Dlg::OnBnClickedButton4()
{
	gSystemMgr.m_cIo.SetOutputIo(55, ON);
	gSystemMgr.m_cIo.SetOutputIo(56, OFF);
}


void CControl30Dlg::OnBnClickedButton5()
{
	gSystemMgr.m_cIo.SetOutputIo(56, ON);
	gSystemMgr.m_cIo.SetOutputIo(55, OFF);
}


void CControl30Dlg::OnBnClickedButton10()
{
	if (gSystemMgr.Y49 == OFF) {
		gSystemMgr.m_cIo.SetOutputIo(49, ON);
	}
	else {
		gSystemMgr.m_cIo.SetOutputIo(49, OFF);
	}
}


void CControl30Dlg::OnBnClickedButton26()
{
	//S45
	gSystemMgr.m_cIo.SetOutputIo(61, ON);
	gSystemMgr.m_cIo.SetOutputIo(60, OFF);
}


void CControl30Dlg::OnBnClickedButton27()
{
	//S46
	gSystemMgr.m_cIo.SetOutputIo(60, ON);
	gSystemMgr.m_cIo.SetOutputIo(61, OFF);
}
